import 'package:flutter/material.dart';
import 'package:life_milestones/features/MS-edit-page.dart';
import 'package:life_milestones/features/MS-launch-page.dart';
import 'package:life_milestones/features/MS-store-page.dart';

import 'features/MS-about-page.dart';
import 'features/MS-login-page.dart';
import 'features/MS-main-page.dart';
import 'features/MS-post-image-page.dart';
import 'features/MS-post-page.dart';
import 'features/MS-post-text-page.dart';
import 'features/MS-post-voice-page.dart';
import 'features/MS-setting-page.dart';
Route<dynamic>? onGenerateRoute(RouteSettings settings){
  switch(settings.name){
    case "/":return MaterialPageRoute(builder: (_)=>const MSMainPage());
    case "launch":return MaterialPageRoute(builder: (_)=>MSLaunchPage());
    case "login":return MaterialPageRoute(builder: (context)=>const MSLoginPage());
    case "/about":return MaterialPageRoute(builder: (context)=>const MSAboutPage());
    case "/setting":return MaterialPageRoute(builder: (context)=>const MSSettingPage());
    case "/edit":return MaterialPageRoute(builder: (context)=>const MSEditPage());
    case "/store":return MaterialPageRoute(builder: (context)=>const MSStorePage());
    case "/post":return MaterialPageRoute(builder: (context)=>MSPostPage(month: settings.arguments as int,));
    case "/post-text":return MaterialPageRoute(builder: (context)=>MSPostTextPage(month: settings.arguments as int,));
    case "/post-image":return MaterialPageRoute(builder: (context)=>MSPostImagePage(month: settings.arguments as int,));
    case "/post-voice":return MaterialPageRoute(builder: (context)=>MSPostVoicePage(month: settings.arguments as int,));
  }

  return MaterialPageRoute(builder: (context)=>const MSLoginPage());
}